### MainScene.gd
extends Node

@onready var dialogue := $DialogueManager
@onready var ui := $UIDisplay
@onready var emotion := $EmotionController
@onready var behavior := $BehaviorManager

func _ready():
	ui.user_submitted.connect(_on_user_input)
	behavior.emotion_changed.connect(emotion.play_emotion)
	dialogue.response_ready.connect(_on_response_ready)

func _on_user_input(text: String):
	dialogue.ask(text)

func _input(event):
	if event is InputEventMouseButton and event.pressed:
		behavior.interact()

func _on_response_ready(emotion_str: String, message: String):
	emotion.play_emotion(emotion_str)
	ui.show_text(message)
